package approve.action;

import resource.pojo.Approvedoc;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;

public class My_ViewForm15_Information extends Activity {

	TextView lbtitle,lbwriter,lbdatecreate,lbtripdate,lbtotaltime,lbemployeeperforment,lblocation,lbdescription,lbcontent;
	TextView txttitle,txtwriter,txtdatecreate,txttripdate,txttotaltime,txtemployeeperforment,txtlocation,txtdescription,txtcontent;
	Bundle language;
	private Approvedoc AppDoc=null;
	String lang = "EN",database="admin";
	public String getLang() {
		Bundle extras = getIntent().getExtras();
		if (extras != null) {
			lang = extras.getString("lang");
		}
		return lang;
	}

	public String getDatabase() {
		Bundle extras = getIntent().getExtras();
		if (extras != null) {
			database = extras.getString("database");
		}
		return database;
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_viewform15_information);
		
		loadBunlde();
		LoadInforApprovedDocument();
	}

	private void loadBunlde() {
		Intent i=this.getIntent();
		AppDoc=(Approvedoc)i.getSerializableExtra("AppDoc");
		language=getIntent().getExtras().getBundle(getLang());
	}
	
	private void LoadInforApprovedDocument(){
		txttitle=(TextView)findViewById(R.id.txtTitle);
		txtwriter=(TextView)findViewById(R.id.txtwriter);
		txtdatecreate=(TextView)findViewById(R.id.txtdatecreate);
		txttripdate=(TextView)findViewById(R.id.txttripdate);
		txttotaltime=(TextView)findViewById(R.id.txttotaltime);
		txtemployeeperforment=(TextView)findViewById(R.id.txtemployeeperforment);
		txtlocation=(TextView)findViewById(R.id.txtlocation);
		txtdescription=(TextView)findViewById(R.id.txtdescription);
		txtcontent=(TextView)findViewById(R.id.txtcontent);
		
		txttitle.setText(AppDoc.getTitle());
		txtwriter.setText(AppDoc.getTitle());
		txtdatecreate.setText(AppDoc.getTimecreate().toString());
//		txttripdate.setText(AppDoc.getTripDate().toString());
		txttotaltime.setText(AppDoc.getTotalTime());
		txtemployeeperforment.setText(AppDoc.getEmployeePerforment());
		txtlocation.setText(AppDoc.getLocation());
		txtdescription.setText(AppDoc.getDescription());
		txtcontent.setText(AppDoc.getContent());
	}
}
